@use '../../_styles/mixin.scss' as *;
@use './var.scss';

.o-breadcrumb {
  display: inline-flex;
  align-items: center;
  color: var(--breadcrumb-color);
  font-size: var(--breadcrumb-text-size);
  line-height: var(--breadcrumb-text-height);

  a {
    color: inherit;
    text-decoration: none;
  }
}

.o-breadcrumb-item {
  display: inline-flex;
  align-items: center;

  &:last-child {
    font-weight: 500;
    
    .o-breadcrumb-item-label {
      color: var(--breadcrumb-color-selected);
      cursor: auto;
      max-width: none;
    }

    .o-breadcrumb-item-separator {
      display: none;
    }
  }
}

.o-breadcrumb-item-label {
  cursor: pointer;
  max-width: var(--breadcrumb-label-max-width);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color var(--o-duration-s) var(--o-easing-standard);
  @include hover {
    color: var(--breadcrumb-color-hover);
  }

  &:active {
    color: var(--breadcrumb-color-active);
  }
}

.o-breadcrumb-item-separator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--breadcrumb-separator-size);
  font-size: var(--breadcrumb-separator-size);
  line-height: 1;
  transition: color var(--o-duration-s) var(--o-easing-standard);
  margin: 0 var(--breadcrumb-gap);
}
